﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace XSTDZ.ERP.Application.DataContracts
{
    public class UserDto
    {
        public Guid Id { get; set; }
        [Display(Name="登陆名：")]
        [Required(ErrorMessage = "登陆名不能为空！")]
        public string AccountName { get; set; }
        [Display(Name = "姓名：")]
        [Required(ErrorMessage = "姓名不能为空！")]
        public string Name { get; set; }
        [Display(Name = "密码：")]
        [Required(ErrorMessage="密码不能为空!")]
        public string Password { get; set; }
        [Display(Name = "性别：")]
        public string Gender { get; set; }
        [Display(Name = "出生日期：")]
        public System.DateTime? Birthday { get; set; }
        [Display(Name = "现住址：")]
        public string Address { get; set; }
        [Display(Name = "移动电话：")]
        public string Mobile { get; set; }
        [Display(Name = "固定电话：")]
        public string Tel { get; set; }
        [Display(Name = "邮编：")]
        public string PostNo { get; set; }
        [Display(Name = "电子邮件：")]
        public string Email { get; set; }
        [Display(Name = "QQ：")]
        public string QQ { get; set; }
        [Display(Name = "MSN：")]
        public string MSN { get; set; }
        [Display(Name = "是否计件：")]
        public string IsPiece { get; set; }


       
        [Display(Name = "登陆次数：")]
        public short? LoginCount { get; set; }
        public System.Nullable<System.DateTime> LastLoginTime { get; set; }
        public string LastLoginIP { get; set; }
        public System.Guid? OrgId { get; set; }
        [Display(Name = "所在部门：")]
        [Required(ErrorMessage = "{0}不能为空！")]
        public System.Guid DeptId { get; set; }
        [Display(Name = "创建日期：")]
        public System.DateTime? CreateTime { get; set; }
        public ICollection<Guid> PermissionIds { get; set; }

        public System.Guid CreateID { get; set; }
        public Nullable<System.Guid> UpdateID { get; set; }
        public Nullable<System.DateTime> UpdateDate { get; set; }

         [Display(Name = "用户角色：")]
        public ICollection<Guid> RoleIds { get; set; }

        public  DeptDto Dept { get; set; }
        public  OrgDto Org { get; set; }

        public string RoleName { get; set; }
    }
}
